Enables debug log
Parent Type: LearningStore
Namespace: Microsoft.LearningComponents.Storage
Assembly: Microsoft.LearningComponents.Storage.dll
| C# |
|
public void EnableDebugLog ( ) |
destination
Object to which the debug output should be written.
When the debug log is enabled, information useful for debugging is written to destination. This currently includes:
There is no guarantee that all information output by SQL Server is in the log. Only the information that is used is added to the log. For example, SQL Server may output a result set and then output an error. Since the error causes the transaction to be rolled back, the first result set is no longer used. Therefore, the result set is not included in the log.
The output is in a pseudo-HTML format. It isn't 100% valid HTML, since it doesn't include e.g., a <HTML> tag. However, it can be viewed in a browser.
The information written may change from version-to-version. Information written to the log may also security-sensitive information (e.g., information that the user wouldn't normally have access to).
Enabling the debug log will decrease the performance of the object. So enabling the debug log on a "live" system is not recommended.
The caller "owns" the object passed in destination. So if, for example, it refers to a file, the file will not be closed until the caller closes it.
| C# |
StreamWriter writer = new StreamWriter("c:\\log.htm");
LearningStore store = new LearningStore("Server=Learning;Database=Mls;Integrated Security=true", "Bob");
store.EnableDebugLog(writer);
...
writer.Dispose();
|